
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Ecs · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="engineering.html" />
    
    
    <link rel="prev" href="dynamic-routing.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="./">
            
                <a href="./">
            
                    
                    前端进阶
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="Grid System.html">
            
                <a href="Grid System.html">
            
                    
                    Grid System
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="Handwritten signature.html">
            
                <a href="Handwritten signature.html">
            
                    
                    Handwritten Signature
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="Mobile Soft Keyboard.html">
            
                <a href="Mobile Soft Keyboard.html">
            
                    
                    Mobile Soft Keyboard
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="authentication.html">
            
                <a href="authentication.html">
            
                    
                    Authentication
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" >
            
                <span>
            
                    
                    Code
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" >
            
                <span>
            
                    
                    Four Operations
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="control loading.html">
            
                <a href="control loading.html">
            
                    
                    Control Loading
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="downfile.html">
            
                <a href="downfile.html">
            
                    
                    Downfile
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="dynamic-routing.html">
            
                <a href="dynamic-routing.html">
            
                    
                    Dynamic Routing
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.11" data-path="ecs.html">
            
                <a href="ecs.html">
            
                    
                    Ecs
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="engineering.html">
            
                <a href="engineering.html">
            
                    
                    Engineering
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="eslint-vscode-format.html">
            
                <a href="eslint-vscode-format.html">
            
                    
                    Eslint Vscode Format
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="eventloop.html">
            
                <a href="eventloop.html">
            
                    
                    Eventloop
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.15" data-path="four-operations-1.html">
            
                <a href="four-operations-1.html">
            
                    
                    Four Operations 1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="four-operations-2.html">
            
                <a href="four-operations-2.html">
            
                    
                    Four Operations 2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.17" data-path="four-operations-3.html">
            
                <a href="four-operations-3.html">
            
                    
                    Four Operations 3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.18" data-path="four-operations-4.html">
            
                <a href="four-operations-4.html">
            
                    
                    Four Operations 4
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.19" data-path="front end summary.html">
            
                <a href="front end summary.html">
            
                    
                    Front End Summary
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.20" data-path="git commit style.html">
            
                <a href="git commit style.html">
            
                    
                    Git Commit Style
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.21" data-path="git-commands.html">
            
                <a href="git-commands.html">
            
                    
                    Git Commands
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.22" data-path="high-quality-code.html">
            
                <a href="high-quality-code.html">
            
                    
                    High Quality Code
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.23" data-path="history.html">
            
                <a href="history.html">
            
                    
                    History
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.24" data-path="html-tag.html">
            
                <a href="html-tag.html">
            
                    
                    Html Tag
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.25" data-path="http-https-http2.html">
            
                <a href="http-https-http2.html">
            
                    
                    Http Https Http2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.26" data-path="ignore log.html">
            
                <a href="ignore log.html">
            
                    
                    Ignore Log
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.27" >
            
                <span>
            
                    
                    Imgs
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.28" data-path="javascript-optimization.html">
            
                <a href="javascript-optimization.html">
            
                    
                    Javascript Optimization
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.29" data-path="local application.html">
            
                <a href="local application.html">
            
                    
                    Local Application
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.30" data-path="locality.html">
            
                <a href="locality.html">
            
                    
                    Locality
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.31" data-path="loop-unrolling.html">
            
                <a href="loop-unrolling.html">
            
                    
                    Loop Unrolling
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.32" data-path="mobile recommendation.html">
            
                <a href="mobile recommendation.html">
            
                    
                    Mobile Recommendation
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.33" data-path="modal.html">
            
                <a href="modal.html">
            
                    
                    Modal
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.34" data-path="monitor.html">
            
                <a href="monitor.html">
            
                    
                    Monitor
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.35" data-path="performance.html">
            
                <a href="performance.html">
            
                    
                    Performance
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.36" data-path="print-talbe.html">
            
                <a href="print-talbe.html">
            
                    
                    Print Talbe
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.37" data-path="promise.html">
            
                <a href="promise.html">
            
                    
                    Promise
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.38" data-path="teaching.html">
            
                <a href="teaching.html">
            
                    
                    Teaching
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.39" data-path="vue refresh.html">
            
                <a href="vue refresh.html">
            
                    
                    Vue Refresh
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.40" data-path="vue-page-not-refresh.html">
            
                <a href="vue-page-not-refresh.html">
            
                    
                    Vue Page Not Refresh
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.41" data-path="why-learn-theory.html">
            
                <a href="why-learn-theory.html">
            
                    
                    Why Learn Theory
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >Ecs</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x963F;&#x91CC;&#x4E91;&#x670D;&#x52A1;&#x5668;&#x90E8;&#x7F72;&#x4E2A;&#x4EBA;&#x7F51;&#x7AD9;nodejs--mongodb">&#x963F;&#x91CC;&#x4E91;&#x670D;&#x52A1;&#x5668;&#x90E8;&#x7F72;&#x4E2A;&#x4EBA;&#x7F51;&#x7AD9;(nodejs + mongodb)</h1>
<ul>
<li><a href="http://118.190.217.8:3389/index" target="_blank">&#x9879;&#x76EE;&#x5728;&#x7EBF;&#x9884;&#x89C8;</a></li>
<li><p><a href="https://github.com/woai3c/node-blog" target="_blank">&#x9879;&#x76EE; github &#x5730;&#x5740;</a></p>
</li>
<li><p>&#x8D2D;&#x4E70;&#x963F;&#x91CC;&#x4E91;&#x670D;&#x52A1;&#x5668;&#xFF0C;&#x9009;&#x62E9;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#xFF0C;&#x6211;&#x9009;&#x7684; ubuntu</p>
</li>
<li>&#x5728;&#x4E91;&#x670D;&#x52A1;&#x5668;&#x7BA1;&#x7406;&#x63A7;&#x5236;&#x53F0;&#x9009;&#x62E9;&#x5B9E;&#x4F8B;-&gt;&#x66F4;&#x591A;-&gt;&#x5BC6;&#x94A5;-&gt;&#x91CD;&#x7F6E;&#x5B9E;&#x4F8B;&#x5BC6;&#x7801;&#xFF08;&#x4E00;&#x4F1A;&#x767B;&#x9646;&#x7528;&#xFF09; </li>
<li>&#x9009;&#x62E9;&#x8FDC;&#x7A0B;&#x8FDE;&#x63A5;-&gt;VNC&#xFF0C;&#x4F1A;&#x5F39;&#x51FA;&#x4E00;&#x4E2A;&#x5BC6;&#x7801;&#xFF0C;&#x8BB0;&#x4F4F;&#x5B83;&#xFF0C;&#x4EE5;&#x540E;&#x8FDC;&#x7A0B;&#x8FDE;&#x63A5;&#x8981;&#x7528;&#xFF08;ctrl + alt + f1~f6 &#x5207;&#x6362;&#x7EC8;&#x7AEF;&#xFF0C;&#x4F8B;&#x5982; ctrl + alt + f1 &#x662F;&#x7B2C;&#x4E00;&#x4E2A;&#x7EC8;&#x7AEF;&#xFF09;</li>
<li>&#x8FDB;&#x5165;&#x540E;&#x662F;&#x4E00;&#x4E2A;&#x547D;&#x4EE4;&#x884C; &#x8F93;&#x5165; <code>root</code>&#xFF08;&#x7528;&#x6237;&#x540D;&#xFF09;&#xFF0C;&#x5BC6;&#x7801;&#x4E3A;&#x4F60;&#x521A;&#x624D;&#x91CD;&#x7F6E;&#x7684;&#x5B9E;&#x4F8B;&#x5BC6;&#x7801;</li>
<li>&#x767B;&#x9646;&#x6210;&#x529F;&#xFF0C; &#x66F4;&#x65B0;&#x5B89;&#x88C5;&#x6E90; <code>sudo apt-get update &amp;&amp; sudo apt-get upgrade -y</code></li>
<li>&#x5B89;&#x88C5; npm <code>sudo apt-get install npm</code></li>
<li>&#x5B89;&#x88C5; npm &#x7BA1;&#x7406;&#x5305; <code>sudo npm install -g n</code></li>
<li>&#x5B89;&#x88C5; node &#x6700;&#x65B0;&#x7A33;&#x5B9A;&#x7248; <code>sudo n stable</code></li>
<li><code>ctrl+d</code> &#x91CD;&#x65B0;&#x767B;&#x9646;</li>
<li>&#x67E5;&#x770B;&#x7248;&#x672C; <code>node -v</code> <code>npm -v</code></li>
<li>&#x5B89;&#x88C5; git  <code>sudo apt-get install git</code></li>
<li>&#x514B;&#x9686;&#x9879;&#x76EE; <code>git clone https://github.com/woai3c/node-blog.git</code></li>
<li><a href="https://zhuanlan.zhihu.com/p/55604183" target="_blank">&#x5B89;&#x88C5;&#x56FE;&#x5F62;&#x5316;&#x754C;&#x9762;</a>&#xFF08;&#x6B64;&#x5904;&#x53EF;&#x8DF3;&#x8FC7;&#xFF09;</li>
<li>&#x5B89;&#x88C5; mongodb <code>sudo apt install -y mongodb</code>&#xFF0C;&#x8FD0;&#x884C;&#x6570;&#x636E;&#x5E93; <code>sudo mongod</code> </li>
<li>&#x5982;&#x679C;&#x62A5;&#x9519; <code>exception in initAndListen: NonExistentPath: Data directory /data/db not found., terminating</code>&#xFF0C;&#x8BF7;&#x6267;&#x884C;&#x547D;&#x4EE4; <code>mkdir /data/db/ -p</code>&#xFF0C;&#x518D;&#x91CD;&#x65B0;&#x8FD0;&#x884C;&#x6570;&#x636E;&#x5E93; <code>sudo mongod</code></li>
<li>&#x5982;&#x679C;&#x62A5;&#x9519; <code>SocketException: Address already in use MONGODB</code>&#xFF0C;&#x8F93;&#x5165; <code>sudo killall mongod</code> &#x5173;&#x6389;&#x6240;&#x6709;&#x7684; mongod &#x8FDB;&#x7A0B;&#xFF0C;&#xFF0C;&#x518D;&#x91CD;&#x65B0;&#x8FD0;&#x884C;&#x6570;&#x636E;&#x5E93; <code>sudo mongod</code></li>
<li>&#x8FDB;&#x5165;&#x9879;&#x76EE;&#x5B89;&#x88C5;&#x4F9D;&#x8D56; <code>npm i</code>  &#x6253;&#x5305;&#x9879;&#x76EE; <code>npm run build</code> &#x8FD0;&#x884C;&#x9879;&#x76EE; <code>npm run server</code></li>
<li>&#x76D1;&#x542C; IP &#x5FC5;&#x987B;&#x4E3A; <code>0.0.0.0</code> &#xFF0C;&#x8BE6;&#x60C5;&#x8BF7;&#x770B;&#x7B2C; 19 &#x9879;</li>
<li><a href="https://www.alibabacloud.com/help/zh/doc-detail/50775.htm" target="_blank">&#x90E8;&#x7F72;Node.js&#x9879;&#x76EE;&#x6CE8;&#x610F;&#x4E8B;&#x9879;</a></li>
</ul>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="dynamic-routing.html" class="navigation navigation-prev " aria-label="Previous page: Dynamic Routing">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="engineering.html" class="navigation navigation-next " aria-label="Next page: Engineering">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Ecs","level":"1.11","depth":1,"next":{"title":"Engineering","level":"1.12","depth":1,"path":"前端进阶/engineering.md","ref":"前端进阶/engineering.md","articles":[]},"previous":{"title":"Dynamic Routing","level":"1.10","depth":1,"path":"前端进阶/dynamic-routing.md","ref":"前端进阶/dynamic-routing.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["summary","livereload"],"pluginsConfig":{"summary":{},"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"前端进阶/ecs.md","mtime":"2021-02-15T12:04:36.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-03-24T08:50:55.666Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

